package pkg.andru.animation;

/**
 * the sprite, frame, and anim xml def
 * 
 * @author idiottiger
 * 
 */

public final class DEF {

    // VALUE TYPE
    public static final int TYPE_INT = 1;
    public static final int TYPE_STRING = 1 << 1;
    public static final int TYPE_FLOAT = 1 << 2;
    public static final int TYPE_BOOLEAN = 1 << 3;
    public static final int TYPE_REFERENCE = 1 << 4;

    // reference support head
    public static final String REF_HEAD_DRAWABLE = "@drawable";
    public static final String REF_HEAD_DIMEN = "@dimen";
    public static final String REF_HEAD_PATH = "@path";

    // support anime entry name
    public static final String CONFIG_FILE_SUPPORT_TYPE = "xml";

    // ALL KEYS AND THE KEY'S VALUE TYPE
    public static final String KEY_ID = "id";
    public static final int TYPE_KEY_ID = TYPE_INT;

    public static final String KEY_NAME = "name";
    public static final int TYPE_KEY_NAME = TYPE_STRING;

    public static final String KEY_BITMAP = "bitmap";
    public static final int TYPE_KEY_BITMAP = TYPE_REFERENCE;

    public static final String KEY_X = "rX";
    public static final int TYPE_KEY_X = TYPE_FLOAT | TYPE_REFERENCE;

    public static final String KEY_Y = "rY";
    public static final int TYPE_KEY_Y = TYPE_FLOAT | TYPE_REFERENCE;

    public static final String KEY_ALPHA = "alpha";
    public static final int TYPE_KEY_ALPHA = TYPE_INT;

    public static final String KEY_DEGREE = "degree";
    public static final int TYPE_KEY_DEGREE = TYPE_FLOAT;

    public static final String KEY_SCALE_X = "scaleX";
    public static final int TYPE_KEY_SCALE_X = TYPE_FLOAT;

    public static final String KEY_SCALE_Y = "scaleY";
    public static final int TYPE_KEY_SCALE_Y = TYPE_FLOAT;

    public static final String KEY_DURATION = "duration";
    public static final int TYPE_KEY_DURATION = TYPE_INT;

    public static final String KEY_KEEPD = "keeped";
    public static final int TYPE_KEY_KEEPD = TYPE_BOOLEAN;

    // the sprites xml root key
    public static final String ROOT_SPRITES_KEY = "sprite-array";
    public static final String ROOT_FRAMES_KEY = "frame-array";
    public static final String ROOT_ANIME_KEY = "anim";
    public static final String TAG_FRAME = "frame";
    public static final String TAG_SPRITE = "sprite";
    public static final String TAG_ROTATE = "rotate";
    public static final String TAG_SCALE = "scale";
}
